/*
 * @(#) OrderStarter.java 2018-09-20
 *
 * Copyright 2018 NetEase.com, Inc. All rights reserved.
 */
package com.xinyi.order.provdier;

import com.weibo.api.motan.common.MotanConstants;
import com.weibo.api.motan.util.MotanSwitcherUtil;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.domain.EntityScan;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.data.elasticsearch.repository.config.EnableElasticsearchRepositories;
import org.springframework.data.jpa.repository.config.EnableJpaRepositories;


@SpringBootApplication
@EnableAutoConfiguration
@EnableConfigurationProperties
@EnableJpaRepositories(basePackages = "com.xinyi.order.provdier.repository.jpa")
@EntityScan(basePackages = "com.xinyi.order.provdier.repository.po")
@ComponentScan("com.xinyi.order.provdier")
@EnableElasticsearchRepositories(basePackages = "com.xinyi.order.provdier.repository.es")
public class OrderStarter {

    public static void main(String[] args) {
        SpringApplication.run(OrderStarter.class, args);
        MotanSwitcherUtil.setSwitcherValue(MotanConstants.REGISTRY_HEARTBEAT_SWITCHER, true);
    }
}
